import request from '@/utils/request'

// 查询资金情况监控列表
export function listDealMoneyMonitor(query) {
  return request({
    url: '/moneyMonitor/dealMoneyMonitor/list',
    method: 'get',
    params: query
  })
}

// 获取最接近的上一个月的数据
export function getByDays(dealId) {
  return request({
    url: '/moneyMonitor/dealMoneyMonitor/getByDays/' + dealId,
    method: 'get'
  })
}

// 查询资金情况监控详细
export function getDealMoneyMonitor(id) {
  return request({
    url: '/moneyMonitor/dealMoneyMonitor/' + id,
    method: 'get'
  })
}

// 验证日期是否重复
export function getCountByDays(days, dealId, id) {
  return request({
    url: '/moneyMonitor/dealMoneyMonitor/getCountByDays/' + days + '/' + dealId + '/' + id,
    method: 'get'
  })
}

// 保存资金情况监控
export function saveDealMoneyMonitor(data) {
  return request({
    url: '/moneyMonitor/dealMoneyMonitor/save',
    method: 'post',
    data: data
  })
}

// 删除资金情况监控
export function delDealMoneyMonitor(id) {
  return request({
    url: '/moneyMonitor/dealMoneyMonitor/' + id,
    method: 'delete'
  })
}

// 导出资金情况监控
export function exportDealMoneyMonitor(query) {
  return request({
    url: '/moneyMonitor/dealMoneyMonitor/export',
    method: 'get',
    params: query
  })
}
